function collectCheckboxData(fields) {
	var data = "";
	if (fields.length > 0) {
		for (var i = 0; i < fields.length; i++) {
			var $item = $(fields[i]);
			if (i == fields.length - 1) {
				data = data.concat($item.val());
			}
			else {
				data = data.concat($item.val()).concat("_");
			}
		}
	}
	return data;
}

function performDelete(deleteUrl) {
	$(document).ready(function() {
		var $checkboxes = $('input:checkbox:checked');
		var checkboxesData = collectCheckboxData($checkboxes);
	    window.location = deleteUrl + "?ids=" + checkboxesData;
	});
}
